﻿<FluentSelect Items=@(Enum.GetValues<JustifyContent>())
              OptionValue="@(c => c.ToAttributeValue())"
              TOption="JustifyContent"
              Position="SelectPosition.Below"
@bind-SelectedOption="@justification" />

<FluentSelect Items=@(Enum.GetValues<Align>())
              OptionValue="@(c => c.ToAttributeValue())"
              TOption="Align"
              Position="SelectPosition.Below"
@bind-SelectedOption="@alignment" />
<br />
<br />


<FluentButton Appearance="Appearance.Accent" @onclick="() => visible = !visible">Show Overlay</FluentButton>

<FluentOverlay @bind-Visible=@visible
               Transparent="false"
               Alignment="@alignment"
               Justification="@justification"
               OnClose="HandleOnClose">
    <FluentProgressRing />
</FluentOverlay>

@code {
    bool visible = false;
    JustifyContent justification = JustifyContent.Center;
    Align alignment = Align.Center;

    protected void HandleOnClose()
    {
        DemoLogger.WriteLine("Overlay closed");
    }
}
